import { $http } from '../index';

// 签约列表 - 签约审批多条件查询
export function getSignApprovalList(data = {}) {
    return $http.post('/saas/joining-trader/join-sign-approval/list', data);
}

// 获取字典
export function findAllDictyType() {
    return $http.post('/saas/joining-trader/dictionary/find-all-dicty-type?isDetail=true');
}

// 获取客户一级行业
export function getIndustryFirstList() {
    return $http.get('/saas/trade/list/first');
}
// 获取客户二级行业
export function getIndustrySecondList() {
    return $http.get('/saas/trade/list/second');
}
// 投放主体或者签约主体
export function getCustomerList(data: any) {
    return $http.post('/saas/joining-trader/customer/pin-mei/list', data);
}

// 查询用户列表
export function getUserList(params: any) {
    return $http.get(`/saas/joining-trader/list-user?departCode=${params.departCode}&name=${params.name}`);
}

// 查询审批流程
export function getApprovaLog(auditId: string) {
    return $http.get(`/saas/joining-trader/join-sign-approval/listLog/${auditId}`);
}

// 查看签约内容
export function getSignApproval(applyId: string) {
    return $http.get(`/saas/joining-trader/join-sign-approval/${applyId}`);
}

// 归档审批详情
export function getArchiveDetail(approveSignId: string) {
    return $http.get(`/saas/joining-trader/join-archive-approve/detail/${approveSignId}`);
}

// 回款列表查询
export function getReceivableList(data: any) {
    return $http.post('/saas/join-goal/receivable/list', data);
}

// 回款新增修改
export function saveReceivable(data: any) {
    return $http.post('/saas/join-goal/receivable/save', data);
}

// 回款统计
export function getAllMoney(data: any) {
    return $http.post('/saas/join-goal/receivable/statistical', data);
}

// 导出
export function exportApproval(data = {}) {
    return $http.post('/saas/joining-trader/join-sign-approval/list/export', data);
}
